Skip to content

Guard against duplicate custom element registration#136

Merged
DanWebb merged 1 commit into
mainfrom
wrap-2181-evergreen-duplicate-element-registration-issues
Mar 21, 2026
Merged

Guard against duplicate custom element registration#136
DanWebb merged 1 commit into
mainfrom
wrap-2181-evergreen-duplicate-element-registration-issues

Conversation

@DanWebb

@DanWebb DanWebb commented Mar 21, 2026

Copy link
Copy Markdown
Collaborator

Adds safeCustomElement decorator that checks customElements.get() before defining, preventing NotSupportedError when the same element is imported multiple times or when multiple versions of Evergreen are loaded on the same page. A console.warn is emitted when a duplicate registration is detected, making version conflicts visible rather than silent.

Adds safeCustomElement decorator that checks customElements.get() before
defining, preventing NotSupportedError when the same element is imported
multiple times or when multiple versions of Evergreen are loaded on the
same page. A console.warn is emitted when a duplicate registration is
detected, making version conflicts visible rather than silent.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@DanWebb DanWebb self-assigned this Mar 21, 2026
@mergify mergify Bot requested a review from a team March 21, 2026 00:50
@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ EDITORCONFIG editorconfig-checker 13 0 0.05s
✅ REPOSITORY checkov yes no 17.15s
✅ REPOSITORY gitleaks yes no 7.92s
✅ REPOSITORY git_diff yes no 0.03s
✅ REPOSITORY secretlint yes no 2.5s
✅ REPOSITORY trivy-sbom yes no 2.65s
✅ REPOSITORY trufflehog yes no 4.32s
✅ TYPESCRIPT eslint 13 0 5.42s

See detailed report in MegaLinter reports
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security

@DanWebb DanWebb merged commit c03f5b3 into main Mar 21, 2026
13 of 14 checks passed
@DanWebb DanWebb deleted the wrap-2181-evergreen-duplicate-element-registration-issues branch March 21, 2026 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant